﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="true" MasterPageFile="~/MasterAdmin.master" CodeFile="AutomovelForm.aspx.cs" Inherits="AreaRestrita_AutomovelForm" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPagina" runat="server">
<table>
    <tr>
        <td valign="top" style="height:350px;">
        <div style="height:350px; width:430px;" class="Rolagem">        
        <div id="stylized"  style="width:380px; height=350px;" class="myform">
        <h1>Pastas Disponíveis</h1>
        <asp:Repeater ID="rptPasta" runat="server" 
                onitemdatabound="rptPasta_ItemDataBound" 
                onitemcommand="rptPasta_ItemCommand"  >        
            <ItemTemplate>
                <p>
                    <asp:LinkButton ID="lbPasta" runat="server" ></asp:LinkButton>
                </p>
            </ItemTemplate>
        </asp:Repeater>
        </div>
        </div>
        <div style="clear:both"><br></div>
        <div style=" height:550px; background-color:#ebf4fb; width:430px;" class="Rolagem">
        <div id="stylized" style="width:380px; height=500px;" class="myform">
        <h1><asp:Label runat="server" ID="lbPasta"> </asp:Label> </h1>
        </div>
            <p>
            <div style="margin-left:40px;">   
            <center>
                <asp:Repeater ID="rptVeiculos" runat="server" onitemdatabound="rptVeiculos_ItemDataBound">        
                    <ItemTemplate>
                        <div style=" width:120px; height:140px; float:left; " >
                            <div style="Float:left; vertical-align:middle;">
                                <asp:Image ID="imgAutomovel" ImageUrl="Imagens/noPhoto.png" Width="100px" runat="server" />
                            </div>            
                        </div>            
                    </ItemTemplate>
                </asp:Repeater>    
            </center>                       
            </div>               
            </p>
        
        </div>
        </td>
        <td valign="top">
        <div id="stylized" class="myform">
           <h1><asp:Literal ID="ltAuto" Text="Autos" runat="server"></asp:Literal></h1>
           <p>Cadastro de autos</p>
           <div>
                <label>ID<span class="small">ID do Automóvel</span></label>
                    
                    <asp:TextBox ID="lblId" CssClass="input" runat="server" Enabled="false"></asp:TextBox>
            </div>
           <div>
                <label>Marca<span class="small">Marca</span></label>
                    <asp:DropDownList ID="ddlMarca" AutoPostBack="true" runat="server"  onselectedindexchanged="ddlMarca_SelectedIndexChanged" CssClass="input"></asp:DropDownList>
                    <asp:CustomValidator ID="cvMarca" runat="server" SetFocusOnError="true" Text="*"  ValidationGroup="Salvar" onservervalidate="cvMarca_ServerValidate"></asp:CustomValidator>
            </div>
            <div>
                <label>Modelo<span class="small"> Modelo</span></label>     
                    <asp:DropDownList ID="ddlModelo"  AutoPostBack="true" runat="server" CssClass="input"></asp:DropDownList>
                    <asp:CustomValidator ID="cvModelo" runat="server" Text="*" SetFocusOnError="true" Enabled="false" ValidationGroup="Salvar" onservervalidate="cvModelo_ServerValidate"></asp:CustomValidator>
             </div>
             <div>
                <label>Garagem<span class="small"> Garagem</span></label>
                    <asp:DropDownList ID="ddlGaragem" runat="server" CssClass="input"></asp:DropDownList>
                    <asp:CustomValidator ID="cvGaragem" runat="server" Text="*"  ValidationGroup="Salvar" SetFocusOnError="true" onservervalidate="cvGaragem_ServerValidate"></asp:CustomValidator>
              </div>
              <div>
                <label>Descricao<span class="small"> descricao Completa</span></label>
                    <asp:TextBox ID="txtDescricao" runat="server" CssClass="input"></asp:TextBox>
              </div>
              <div>
                <label>Ano <span class="small"> Ano de fabricacao</span></label>
                    <asp:TextBox ID="txtAnoFabricacao" runat="server" CssClass="input"></asp:TextBox>                    
                    <asp:RangeValidator ID="rvAnoFab" Text="*" ValidationGroup="Salvar" 
                      SetFocusOnError="true" ControlToValidate="txtAnoFabricacao" runat="server" 
                      MaximumValue="9000" MinimumValue="1800"></asp:RangeValidator>
              </div>
              <div>
                <label>Ano<span class="small">Ano Modelo</span></label>
                    <asp:TextBox ID="txtAnoModelo" runat="server" CssClass="input"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rvAnoModelo" Text="*" ValidationGroup="Salvar" SetFocusOnError="true" ControlToValidate="txtAnoModelo" runat="server"></asp:RequiredFieldValidator>
              </div>
              <div>
                <label>Blindado<span class="small">Blindado</span></label>
                    <asp:CheckBox ID="chkBlindado" Text="" runat="server" CssClass="input"/>
              </div>
              <div>
                <label>Preco<span class="small"> Preco</span></label>
                    <asp:TextBox ID="txtPreco" runat="server" CssClass="input"></asp:TextBox>
              </div>
              <div>
                <label>Kilometragem<span class="small">KM </span></label>
                    <asp:TextBox ID="txtKilometragem" runat="server" CssClass="input"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rvKm" Text="*" ValidationGroup="Salvar" SetFocusOnError="true" ControlToValidate="txtKilometragem" runat="server"></asp:RequiredFieldValidator>
              </div>
              <div>
                <label>Ativo<span class="small">Ativar</span></label>
                    <asp:CheckBox ID="chkAtivo" Text="" runat="server" CssClass="input" />
              </div>
              <div>
                <label>Cambio<span class="small"> Cambio</span></label>
                    <asp:DropDownList ID="ddlCambio" runat="server" CssClass="input">
                        <asp:ListItem>Não Informado</asp:ListItem>
                        <asp:ListItem Value="Mecânico">Mecânico</asp:ListItem>
                        <asp:ListItem Value="Automático">Automático</asp:ListItem>
                        <asp:ListItem Value="Automático Tip">Automático Tip</asp:ListItem>
                        <asp:ListItem Value="Automático Multi">Automático Multi</asp:ListItem>
                    </asp:DropDownList>
              </div>
              <div>
                <label>Portas<span class="small"> Qtde Portas</span></label>
                    <asp:TextBox ID="txtPortas" runat="server" CssClass="input"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rvPortas" Text="*" ValidationGroup="Salvar" ControlToValidate="txtPortas" SetFocusOnError="true" runat="server"></asp:RequiredFieldValidator>
              </div>
              <div>   
                <label>A Venda<span class="small"> Click para ativar</span></label>
                    <asp:CheckBox ID="chkVenda" Text="" runat="server" CssClass="input"/>
              </div>
              <div>
                <label>Combustivel<span class="small">Combustivel</span></label>
                <asp:DropDownList ID="ddlCombustivel" runat="server" CssClass="input">
                        <asp:ListItem>Não Informado</asp:ListItem>
                        <asp:ListItem Value="Álcool/Etanol">Álcool/Etanol</asp:ListItem>
                        <asp:ListItem Value="Álcool/Gasolina">Álcool/Gasolina</asp:ListItem>
                        <asp:ListItem Value="Gasolina">Gasolina</asp:ListItem>
                        <asp:ListItem Value="Diesel">Diesel</asp:ListItem>
                        <asp:ListItem Value="Elétrico">Elétrico</asp:ListItem>
                        <asp:ListItem Value="Outros">Outros</asp:ListItem>
                    </asp:DropDownList>
              </div>
              <div> 
                <label>Cor<span class="small"> Cor</span></label>
                    <asp:DropDownList ID="ddlCor" runat="server" CssClass="input">

                        <asp:ListItem>Não Informado</asp:ListItem>

                        <asp:ListItem Value="Amarela">Amarela</asp:ListItem>
                        <asp:ListItem Value="Azul">Azul</asp:ListItem>
                        <asp:ListItem Value="Bege">Bege</asp:ListItem>
                        <asp:ListItem Value="Branca">Branca</asp:ListItem>
                        <asp:ListItem Value="Cinza">Cinza</asp:ListItem>
                        <asp:ListItem Value="Dourada">Dourada</asp:ListItem>
                        <asp:ListItem Value="Laranja">Laranja</asp:ListItem>
                        <asp:ListItem Value="Marrom">Marrom</asp:ListItem>
                        <asp:ListItem Value="Prata">Prata</asp:ListItem>
                        <asp:ListItem Value="Preta">Preta</asp:ListItem>
                        <asp:ListItem Value="Verde">Verde</asp:ListItem>
                        <asp:ListItem Value="Vermelho">Vermelho</asp:ListItem>
                        <asp:ListItem Value="Vinho">Vinho</asp:ListItem>
                    </asp:DropDownList>
              </div>
             
              <div>
                <label>Observacoes<span class="small" >Observacoes</span></label>
                    <asp:TextBox ID="txtObervacoes" runat="server"  TextMode="MultiLine" CssClass="input"></asp:TextBox>  
              </div>
              <div>
                <label>Vitrine<span class="small" >Vitrine</span></label>
                    <asp:CheckBox runat="server" ID="chkVitrine" CssClass="input"  />  
              </div>
              <div>                   
                    <asp:Button ID="btnSalvar" runat="server" Text="Salvar" ValidationGroup="Salvar" onclick="btnSalvar_Click"  CssClass="button" />
              </div>
           </div></td>
    </tr>
</table>

        
        
    <asp:HiddenField ID="hdfID" runat="server" />
</asp:Content>
